<template>
  <menuListWrap :custom="custom" v-if="!Loading"> </menuListWrap>
</template>

<script>
import menuListWrap from '@/views/menuList/core/menuListWrap'
import listPage from '@/views/questionnaire/list.vue'
import statisticPage from '@/views/questionnaire/statistic.vue'
export default {
  components: { menuListWrap },
  data() {
    return {
      Loading: true,
      custom: {}
    }
  },
  created() {
    this.custom = [
      {
        label: '2023年华润集团数字化转型调查',
        onOpt: this.checkFun,
        onView: this.handerEdit,
        onSummary: this.statisticsFun,
        hasSummary: true,
        operate: false,
        view: true,
        summary: true
      }
    ]
    this.Loading = false
  },
  methods: {
    statisticsFun() {
      new this.$sidelipPage(statisticPage, {
        props: {
          $route: this.$route,
          $router: this.$router,
          scrollKey: this.$route.query.keyNumber,
          buCode: this.$route.query.buCode,
          buName: this.$route.query.buName
        }
      })
    },
    // 操作
    checkFun() {
      new this.$sidelipPage(listPage, {
        props: { $route: this.$route }
      })
    },
    handerEdit() {
      new this.$sidelipPage(listPage, {
        props: {
          onlyRead: true,
          typeName: '2023年华润集团数字化转型调查',
          oldTypeName: '2023年华润集团数字化转型调查'
        }
      })
    }
  }
}
</script>
